//
//  LayoutButton.swift
//  liveKitDemo
//
//  Created by WeCloudIOS on 2022/4/7.
//

import UIKit

class LayoutButton: UIView {
    
    lazy var btn: UIButton = {
        let btn = UIButton()
        btn.setImage(UIImage.init(named: "logo"), for: .normal)
        btn.layer.cornerRadius = 30
        return btn
    }()
    
    lazy var stateLabel: UILabel = {
        let label = UILabel();
        label.text = "正在邀请"
        label.textAlignment = .center
        label.textColor = UIColor.white
        label.font = UIFont.systemFont(ofSize: 14)
        return label
    }()
    
    init(){
        super.init(frame: .zero)
        self.addSubview(btn)
        self.addSubview(stateLabel)
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override func layoutSubviews() {
        btn.frame = CGRect(x: 0, y: 0, width: self.frame.width, height: self.frame.width)
        stateLabel.frame = CGRect(x: 0, y: self.frame.width+5, width: self.frame.width, height: 20)
    }
    
}
